home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 01 - 1984 & 1985 / 01.13 Dec 85.sit / 01.13 Dec 85 / c / pop-up menus 1-13 / megamax popup / mm_testpopup.c < prev    next >
MacBinary  |  1985-10-21  |  1.5 KB  |  [TEXT/EDIT]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Oct 21 11:05:39 1985, modified Mon Oct 21 11:05:39 1985, creator Macintosh Edit, type ASCII, 896 bytes "mm_testpopup.c" , at 0x400 388 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[EDIT]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 6d 6d 5f 74 65 73 | 74 70 6f 70 75 70 2e 63 |..mm_tes|tpopup.c|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 45 44 49 | 54 01 00 00 00 00 00 00 |.TEXTEDI|T.......|
|00000050| 00 00 00 00 00 03 80 00 | 00 01 84 99 e0 16 c3 99 |........|........|
|00000060| e0 16 c3 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 7a df 00 00 |........|....z...|
|00000080| 23 69 6e 63 6c 75 64 65 | 20 3c 71 64 2e 68 3e 0d |#include| <qd.h>.|
|00000090| 23 69 6e 63 6c 75 64 65 | 20 3c 71 64 76 61 72 73 |#include| <qdvars|
|000000a0| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 6d 65 |.h>.#inc|lude <me|
|000000b0| 6e 75 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |nu.h>.#i|nclude <|
|000000c0| 65 76 65 6e 74 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |event.h>|.#includ|
|000000d0| 65 20 3c 74 6f 6f 6c 62 | 6f 78 2e 68 3e 0d 0d 65 |e <toolb|ox.h>..e|
|000000e0| 78 74 65 72 6e 20 6c 6f | 6e 67 20 70 6f 70 75 70 |xtern lo|ng popup|
|000000f0| 73 65 6c 65 63 74 28 29 | 3b 0d 0d 6d 61 69 6e 28 |select()|;..main(|
|00000100| 29 0d 09 7b 0d 09 6d 65 | 6e 75 68 61 6e 64 6c 65 |)..{..me|nuhandle|
|00000110| 20 6d 65 6e 75 3b 0d 09 | 65 76 65 6e 74 72 65 63 | menu;..|eventrec|
|00000120| 6f 72 64 20 65 76 65 6e | 74 3b 0d 09 67 72 61 66 |ord even|t;..graf|
|00000130| 70 74 72 20 70 6f 72 74 | 3b 0d 09 72 65 63 74 20 |ptr port|;..rect |
|00000140| 62 6f 78 3b 0d 0d 09 2f | 2a 20 69 6e 69 74 69 61 |box;.../|* initia|
|00000150| 6c 69 7a 65 20 74 68 65 | 20 6d 61 6e 61 67 65 72 |lize the| manager|
|00000160| 73 20 2a 2f 0d 09 69 6e | 69 74 67 72 61 66 28 26 |s */..in|itgraf(&|
|00000170| 74 68 65 70 6f 72 74 29 | 3b 0d 09 69 6e 69 74 66 |theport)|;..initf|
|00000180| 6f 6e 74 73 28 29 3b 0d | 09 69 6e 69 74 77 69 6e |onts();.|.initwin|
|00000190| 64 6f 77 73 28 29 3b 0d | 09 69 6e 69 74 6d 65 6e |dows();.|.initmen|
|000001a0| 75 73 28 29 3b 0d 09 74 | 65 69 6e 69 74 28 29 3b |us();..t|einit();|
|000001b0| 0d 09 69 6e 69 74 64 69 | 61 6c 6f 67 73 28 30 4c |..initdi|alogs(0L|
|000001c0| 29 3b 0d 09 69 6e 69 74 | 63 75 72 73 6f 72 28 29 |);..init|cursor()|
|000001d0| 3b 0d 0d 09 2f 2a 20 64 | 72 61 77 20 74 68 65 20 |;.../* d|raw the |
|000001e0| 69 63 6f 6e 20 2a 2f 0d | 09 67 65 74 77 6d 67 72 |icon */.|.getwmgr|
|000001f0| 70 6f 72 74 28 26 70 6f | 72 74 29 3b 0d 09 73 65 |port(&po|rt);..se|
|00000200| 74 70 6f 72 74 28 70 6f | 72 74 29 3b 0d 09 63 6c |tport(po|rt);..cl|
|00000210| 69 70 72 65 63 74 28 26 | 70 6f 72 74 2d 3e 70 6f |iprect(&|port->po|
|00000220| 72 74 72 65 63 74 29 3b | 0d 09 73 65 74 72 65 63 |rtrect);|..setrec|
|00000230| 74 28 26 62 6f 78 2c 20 | 33 32 2c 20 33 32 2c 20 |t(&box, |32, 32, |
|00000240| 36 34 2c 20 36 34 29 3b | 0d 09 70 6c 6f 74 69 63 |64, 64);|..plotic|
|00000250| 6f 6e 28 26 62 6f 78 2c | 20 67 65 74 69 63 6f 6e |on(&box,| geticon|
|00000260| 28 30 29 29 3b 0d 0d 09 | 2f 2a 20 69 6e 69 74 69 |(0));...|/* initi|
|00000270| 61 6c 69 7a 65 20 74 68 | 65 20 70 6f 70 75 70 20 |alize th|e popup |
|00000280| 6d 65 6e 75 20 2a 2f 0d | 09 6d 65 6e 75 20 3d 20 |menu */.|.menu = |
|00000290| 6e 65 77 6d 65 6e 75 28 | 31 2c 20 22 22 29 3b 0d |newmenu(|1, "");.|
|000002a0| 09 61 70 70 65 6e 64 6d | 65 6e 75 28 6d 65 6e 75 |.appendm|enu(menu|
|000002b0| 2c 20 22 42 65 65 70 3b | 28 2d 3b 51 75 69 74 22 |, "Beep;|(-;Quit"|
|000002c0| 29 3b 0d 0d 09 2f 2a 20 | 68 61 6e 64 6c 65 20 6d |);.../* |handle m|
|000002d0| 6f 75 73 65 20 64 6f 77 | 6e 20 65 76 65 6e 74 73 |ouse dow|n events|
|000002e0| 20 2a 2f 0d 09 77 68 69 | 6c 65 20 28 31 29 0d 09 | */..whi|le (1)..|
|000002f0| 09 7b 0d 09 09 67 65 74 | 6e 65 78 74 65 76 65 6e |.{...get|nexteven|
|00000300| 74 28 65 76 65 72 79 65 | 76 65 6e 74 2c 20 26 65 |t(everye|vent, &e|
|00000310| 76 65 6e 74 29 3b 0d 09 | 09 69 66 20 28 65 76 65 |vent);..|.if (eve|
|00000320| 6e 74 2e 77 68 61 74 20 | 3d 3d 20 6d 6f 75 73 65 |nt.what |== mouse|
|00000330| 64 6f 77 6e 29 0d 09 09 | 09 69 66 20 28 70 74 69 |down)...|.if (pti|
|00000340| 6e 72 65 63 74 28 26 65 | 76 65 6e 74 2e 77 68 65 |nrect(&e|vent.whe|
|00000350| 72 65 2c 20 26 62 6f 78 | 29 29 0d 09 09 09 09 73 |re, &box|)).....s|
|00000360| 77 69 74 63 68 20 28 6c | 6f 77 6f 72 64 28 70 6f |witch (l|oword(po|
|00000370| 70 75 70 73 65 6c 65 63 | 74 28 6d 65 6e 75 2c 20 |pupselec|t(menu, |
|00000380| 26 65 76 65 6e 74 2e 77 | 68 65 72 65 29 29 29 0d |&event.w|here))).|
|00000390| 09 09 09 09 09 7b 0d 09 | 09 09 09 09 63 61 73 65 |.....{..|....case|
|000003a0| 20 31 3a 0d 09 09 09 09 | 09 09 73 79 73 62 65 65 | 1:.....|..sysbee|
|000003b0| 70 28 34 29 3b 0d 09 09 | 09 09 09 09 62 72 65 61 |p(4);...|....brea|
|000003c0| 6b 3b 0d 09 09 09 09 09 | 63 61 73 65 20 33 3a 0d |k;......|case 3:.|
|000003d0| 09 09 09 09 09 09 65 78 | 69 74 74 6f 73 68 65 6c |......ex|ittoshel|
|000003e0| 6c 28 29 3b 0d 09 09 09 | 09 09 09 62 72 65 61 6b |l();....|...break|
|000003f0| 3b 0d 09 09 09 09 09 7d | 0d 09 09 7d 0d 09 7d 0d |;......}|...}..}.|
|00000400| 00 00 01 00 00 00 01 1e | 00 00 00 1e 00 00 00 66 |........|.......f|
|00000410| 04 2f 0b 4e ba fb 69 6e | 76 61 6c 69 6c 69 73 74 |./.N..in|valilist|
|00000420| 0a 00 00 0e 58 8f 20 53 | 11 47 00 35 2f 2e ff fc |....X. S|.G.5/...|
|00000430| 0e 6d 6d 5f 74 65 73 74 | 70 6f 70 75 70 2e 63 6f |.mm_test|popup.co|
|00000440| 02 00 00 00 54 45 58 54 | 45 44 49 54 01 00 00 16 |....TEXT|EDIT....|
|00000450| 00 00 54 45 58 54 45 44 | 49 54 01 00 00 16 00 3d |..TEXTED|IT.....=|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 99 b4 6f 88 00 00 | 03 80 00 00 01 84 76 65 |....o...|......ve|
|00000480| 69 6c 69 0a 00 00 02 5c | 8f ff 38 36 0a 04 4e 5e |ili....\|..86..N^|
|00000490| 4e 75 ff 24 38 35 0a 02 | 00 00 fe 64 65 61 63 74 |Nu.$85..|...deact|
|000004a0| 69 76 65 69 6c 0a 02 4e | 56 fc 24 38 37 0a 00 00 |iveil..N|V.$87...|
|000004b0| 08 42 67 2f 2e 00 08 4e | ba fc 5f 61 63 74 69 76 |.Bg/...N|.._activ|
|000004c0| 65 69 6c 69 0a 00 00 02 | 5c 8f ff 38 38 0a 04 4e |eili....|\..88..N|
|000004d0| 5e 4e 75 ff 24 38 37 0a | 02 00 00 ff 74 68 75 6d |^Nu.$87.|....thum|
|000004e0| 62 73 63 72 6f 6c 0a 02 | 4e 56 fc 24 38 39 0a 00 |bscrol..|NV.$89..|
|000004f0| 00 0c 2f 0b 26 6e 00 08 | 2f 0a 2f 0b 4e ba fb 67 |../.&n..|/./.N..g|
|00000500| 00 00 00 04 02 09 04 01 | 00 00 00 0a 00 09 06 4d |........|.......M|
|00000510| 6f 6e 61 63 6f 00 00 00 | 00 04 00 06 00 08 00 00 |onaco...|........|
|00000520| 01 00 00 00 01 1e 00 00 | 00 1e 00 00 00 66 00 00 |........|.....f..|
|00000530| cc 1c 02 94 00 00 00 1c | 00 5a 00 02 45 4f 50 54 |........|.Z..EOPT|
|00000540| 00 00 00 1a 45 46 4e 54 | 00 00 00 26 45 54 41 42 |....EFNT|...&ETAB|
|00000550| 00 00 00 32 03 ee 00 00 | 00 00 00 00 00 00 00 00 |...2....|........|
|00000560| 03 eb ff ff 00 00 00 08 | 00 01 6f a2 03 ec ff ff |........|..o.....|
|00000570| 00 00 00 16 00 01 6f 7e | 0b 65 64 69 74 6f 72 20 |......o~|.editor |
|00000580| 69 6e 66 6f 00 00 00 00 | 00 00 00 00 00 00 00 00 |info....|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+